<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单元素状态选择器</title>
    <script src="../../js/jquery.1.8.3.min.js"></script>
    <script>
        $(function () {
           var node1 = $(":disabled");
            for (var i = 0; i <node1.length ; i++) {
                console.log("失效元素：" + node1[i].name)
            }

           var node2 = $(":checked");
            for (var i = 0; i <node2.length ; i++) {
                console.log("被选中的元素：" + node2[i].value)
            }

            var node3 = $("td:parent");
            for (var i = 0; i < node3.length; i++) {
                console.log("元素的父节点：" + node3[i].innerText)
            }
        })
    </script>
</head>
<body>
    <form>
        <input name="email" disabled="disabled">email <br>
        <input name="text" disabled="disabled">text <br>
        <input name="password">password <br>
        <input name="id">id <br>
        <input type="checkbox" checked="checked" value="吃货"/>吃货<br>
        <input type="checkbox" value="蠢货"/>蠢货<br>
    </form>
    <table border="1px">
        <tr>
            <td>AAA</td>
            <td>1111</td>
        </tr>
        <tr>
            <td>BBB</td>
            <td>2222</td>
        </tr>
    </table>
</body>
</html>